﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SteamFluentAPI.Infrastructure.Base;

namespace SteamFluentAPI.Infrastructure
{
    public class SteamUser : SteamInterface
    {
        /// <summary>
        /// User friend list.
        /// </summary>
        [SteamMethod("v1")]
        public GetFriendList GetFriendList { get { return new GetFriendList(); } }
        /// <summary>
        /// Player ban/probation status
        /// </summary>
        [SteamMethod("v1")]
        public GetPlayerBans GetPlayerBans { get { return new GetPlayerBans(); } }
        /// <summary>
        /// User profile data
        /// </summary>
        [SteamMethod("v0002")]
        public GetPlayerSummaries GetPlayerSummaries { get { return new GetPlayerSummaries(); } }
        /// <summary>
        /// (TODO)
        /// </summary>
        [NotImplemented]
        [SteamMethod("v1")]
        public GetUserGroupList GetUserGroupList { get { return new GetUserGroupList(); } }
        /// <summary>
        /// Resolve vanity URL parts to a 64 bit ID.
        /// </summary>
        [SteamMethod("v0001")]
        public ResolveVanityURL ResolveVanityURL { get { return new ResolveVanityURL(); } }
    }

    public class GetFriendList : SteamIDMethod
    {
        /// <summary>
        /// Filter by a given role. (REQUIRED)
        /// </summary>
        /// <param name="relationship"></param>
        [RequiredParameter("relationship")]
        public void Relationship(SteamUserRelationship relationship)
        {
            string value = "all";

            if (relationship == SteamUserRelationship.FRIEND)
            {
                value = "friend";
            }

            Add("relationship", value);
        }
    }

    public class GetPlayerBans : SteamIDsMethod
    {
    }

    public class GetPlayerSummaries : SteamIDsMethod
    {
    }

    public class GetUserGroupList : SteamMethod
    {

    }

    public class ResolveVanityURL : SteamMethod
    {
        /// <summary>
        /// The vanity URL part of a user's Steam profile URL. This is the basename of http://steamcommunity.com/id/ URLs. (REQUIRED)
        /// </summary>
        /// <param name="vanityurl"></param>
        [RequiredParameter("vanityurl")]
        public void VanityUrl(string vanityurl)
        {
            Add("vanityurl", vanityurl);
        }
    }
}
